<?php
class NControllerCommon{
 


function __construct(){
 
$this->db = $db=NFactory::getdbo();


}

function dispatch(){
if(NRequest::getVar('task',"_REQUEST")){
	$sFunction="task_".NRequest::getVar('task',"_REQUEST");
	if(!method_exists($this,$sFunction)){
		$sFunction="view_default";
	}
}elseif (NRequest::getVar('view',"_REQUEST")){
	$sFunction="view_".NRequest::getVar('view',"_REQUEST");
	if(!method_exists($this,$sFunction)){
		$sFunction="view_default";
	} 
} else {
		$sFunction="view_default";

	}
	$this->$sFunction();
}

/**
* TODO  getView
*/
function &getView($name){


}


}
?>